package com.example.model;

import java.io.Serializable;

public class Shop implements Serializable{
	private static final long serialVersionUID = 1L;
	private long _id;
	private String shopName;
	private String shopAddress;
	public static final String ID = "_id";
	public static final String NAME = "name";
	public static final String ADDRESS = "address";
	
	public Shop(long id, String shopName, String shopAddress) {
		super();
		this._id = id;
		this.shopName = shopName;
		this.shopAddress = shopAddress;
	}
	public long get_id() {
		return _id;
	}
	public void set_id(long _id) {
		this._id = _id;
	}
	public String getShopName() {
		return shopName;
	}
	public void setShopName(String shopName) {
		this.shopName = shopName;
	}
	public String getShopAddress() {
		return shopAddress;
	}
	public void setShopAddress(String shopAddress) {
		this.shopAddress = shopAddress;
	}
	@Override
	public String toString() {
		return "Shop [_id=" + _id + ", shopName=" + shopName + ", shopAddress="
				+ shopAddress + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (_id ^ (_id >>> 32));
		result = prime * result
				+ ((shopAddress == null) ? 0 : shopAddress.hashCode());
		result = prime * result
				+ ((shopName == null) ? 0 : shopName.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Shop other = (Shop) obj;
		if (_id != other._id)
			return false;
		if (shopAddress == null) {
			if (other.shopAddress != null)
				return false;
		} else if (!shopAddress.equals(other.shopAddress))
			return false;
		if (shopName == null) {
			if (other.shopName != null)
				return false;
		} else if (!shopName.equals(other.shopName))
			return false;
		return true;
	}

	
}
